<!DOCTYPE html>
<html>
	<head>
		<script>
var console = window.console||{log:function (str) {
	alert(str)
}}
		function _getHead() {

		  var head = document.getElementsByTagName('head')[0];
		  //If BASE tag is in play, using appendChild is a problem for IE6.
		  //When that browser dies, this can be removed. Details in this jQuery bug:
		  //http://dev.jquery.com/ticket/2709
		  var baseElement = document.getElementsByTagName('base')[0];
		  if (baseElement) {
		    head = baseElement.parentNode;
		  }
		  return head
		}
		 scr = document.createElement("script");
		  // scr.text = "alert(1+1)";
		 scr.src = "http://dev.dotnar.com:3000/./config/config.json?_="+Math.random();
		 _getHead().appendChild(scr);
		console.log("1");
		</script>
		<script src="http://dev.dotnar.com:3000/./config/config.json?_=sada"></script>
		<script>
		console.log(window.appConfig);
		console.log("2");
		setTimeout(function _() {
			if (window.appConfig) {
				console.log(window.appConfig);
			}else{
				console.log(window.appConfig);
				setTimeout(_,1000);
			}
		},1000)
		</script>
	</head>
</html>
